package com.huanletao.tree;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * </p>
 * package: org.huanletao.ssm.util
 * description:
 * className: TreeNode
 * author:  踏雪无痕
 * copyright: Copyright (c) 2022/9/10 8:59
 * since: 1.0.0
 */
public interface TreeNode<T> {

    Serializable getParentId();

    void setTreeChildrenNode(List<T> childList);

    Serializable getId();

    List<T> getTreeChildrenNode();

    /**
     * 获取节点的显示信息
     *
     * @param node 节点
     * @return 节点的显示信息
     */
    default String getNodeDisplayInfo() {
        return String.valueOf(getId());
    }
}
